package com.cqie.secondhandtransaction.DTO;

import com.cqie.secondhandtransaction.utils.RegexpUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserDTO {

    @ApiModelProperty("id")
    private Integer id;

    @ApiModelProperty("姓名")
    @NotBlank(message = "姓名不能为空")
    private String userName;

    @ApiModelProperty("电话号码，11位")
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = RegexpUtils.PHONE_VALIDATE, message = "请填写正确的的手机号格式")
    private String phone;

    @ApiModelProperty("地址")
    @NotBlank(message = "地址不能为空")
    private String address;

}
